package jp.co.ledinge.syllabarygame;

import java.io.Serializable;
/**
 * 文字の特徴点とセグメントからなるクラス
 */
public class Pattern implements Serializable {

	private static final long serialVersionUID = -3286098571075420652L;
	public Segment[] segments;
	public Point[] points;
	/**
	 * 認識済の文字。入力中の場合はNULL
	 */
	private String mNowStr;
	private int mDistance;
	public Pattern(Point[] points2, Segment[] segments2) {
		this.points = points2;
		this.segments = segments2;
	}
	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();
		for (int i = 0; i < points.length; i++) {
			result.append("Point" + i + "=" + points[i] + " ");
		}
		for (int i = 0; i < segments.length; i++) {
			result.append("Segment" + i + "=" + segments[i] + " ");
		}
		return super.toString();
	}
	public void setCharStr(String nowStr) {
		mNowStr = nowStr;
	}
	public String getCharStr() {
		return mNowStr;
	}
	public void setDistance(int distance) {
		mDistance = distance;
	}
	public int getDistance() {
		return mDistance;
	}
}
